package com.atguigu.spring5.aopxml;

import com.atguigu.spring5.aopanno.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAopXml {
    @Test
    public void testAopAnno(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean11.xml");
        Book book = context.getBean("book", Book.class);
        // 执行被增强类的方法，增强方法会自动运行
        book.buy();

    }
}
